home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_09_01 / 9n01107a < prev    next >
Text File  |  1990-10-03  |  514b  |  24 lines

  1.  
  2. done:
  3.         if (error) result = TCL_ERROR;
  4.         else {
  5.                 char *action;
  6.  
  7.                 if (match) action = p->action;
  8.                 else if (eof) action = eof_action;
  9.                 else action = timeout_action;
  10.  
  11.                 if (action) result = Tcl_Eval(interp,action,0,(char **) NULL);
  12.                 else result = TCL_OK;
  13.  
  14.                 Tcl_SetVar(interp,"expect_match",buf,0);
  15.         }
  16.  
  17.         free((char *)pairs);
  18.  
  19.         return(result);
  20. }
  21.  
  22. Listing 9
  23.  
  24.